<template>
<span class="bh-tag bh-tag--light" :class="'bh-tag-' + type" @click='handleClick'>
	<slot></slot>
	<i v-if='closable' class="bh-tag__close bh-icon-close" @click='handleClose'></i>
</span>
</template>

<script>
export default {
	name: 'bh-tag',
	props: {
		closable: Boolean,
		type: String,
	},
	methods: {
		handleClick(event) {
			console.log('handleClick', event);
			this.$emit('handleClick');
		},
		handleClose(event) {
			event.stopPropagation();
			console.log('handleClose', event);
			this.$emit('handleClose');
		},
	},
}
</script>
